# import cv2
#
# # 读取图片文件
# img = cv2.imread("puppy.jpg")
#
# # 打印图片的基本信息
# print('img.shape:', img.shape)
# print('行数（高度）:', img.shape)
# print('列数（宽度）:', img.shape)
# print('通道数:', img.shape)
# print('图片尺寸:', img.shape[:2])
# print('数据类型:', img.dtype)
# cv2.imshow('image',img)
# cv2.waitKey()

import cv2
img = cv2.imread("puppy.jpg")
cv2.imshow("showimg",img)
cv2.imwrite("puppy.jpg",img)
cv2.waitKey()
cv2.destroyAllWindows()
